package com.evil.application.strategy.application;

import com.evil.application.pojo.dto.CopyApplicationDTO;
import com.evil.application.pojo.entity.ApplicationInfo;
import com.evil.common.application.enums.ApplicationTypeEnum;
import org.springframework.validation.annotation.Validated;

/**
 * 应用操作-接口
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface ApplicationOperation {

    /**
     * 应用类型
     *
     * @return ApplicationTypeEnum
     */
    ApplicationTypeEnum type();

    /**
     * 新增应用
     *
     * @param applicationInfo applicationInfo
     */
    void addApplication(ApplicationInfo applicationInfo);

    /**
     * 删除应用
     *
     * @param applicationInfo applicationInfo
     */
    void deleteApplication(ApplicationInfo applicationInfo);

    /**
     * 复制应用
     *
     * @param copyApplicationDTO copyApplicationDTO
     */
    void copyApplication(@Validated CopyApplicationDTO copyApplicationDTO);

    /**
     * 发布应用
     *
     * @param applicationInfo applicationInfo
     */
    void publishApplication(ApplicationInfo applicationInfo);

    /**
     * 还原应用
     *
     * @param applicationInfo applicationInfo
     */
    void restoreApplication(ApplicationInfo applicationInfo);
}
